const Koa=require('koa')
const Router=require('koa-router')

const {koaBody}=require('koa-body')
const usersRouter=require('./routers/users')

const app=new Koa()
const router=new Router()

app.use(koaBody())
router.use(usersRouter)

app.use(router.routes()).use(router.allowedMethods())

app.listen(9000,()=>{
    console.log('服务器启动成功 localhost:9000');
})